import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'

// https://vitejs.dev/config/
export default defineConfig({
  base: './',
  plugins: [vue()],
  resolve: {
    // 配置路径别名
    alias: {
      '@': path.resolve(__dirname, './src'),
    },
  },
  assetsInclude: ['**/*.swf'],
  server: {
    port: 8888,
    proxy: {
      '/haikang': {
        target: 'http://101.133.234.110:9911/',
        rewrite: path => path.replace(/^\/haikang/, ''),
        changeOrigin: true,
      },
    },
  },
})
